# 参考 https://blog.csdn.net/ggj00006/article/details/18282845
# https://blog.csdn.net/zhukui66/article/details/17436697
# https://blog.csdn.net/xc_zhou/article/details/86247518

sym2code = {
    "LButton":  1,
    "RButton":  2,
    "MButton":  4,
    # "Cancel": 3,  # Ctrl+Break(通常不需要处理)
    "Back":     8,
    "Tab":      9,
    "Clear":    12,  # Clear键（NumLock关闭时的数字键盘5）
    "Enter":    13,
    "Shift":    16,
    "Ctrl":     17,
    "Alt":      18,
    "Pause":    19,
    "Caps Lock": 20,
    "Esc":      27,
    "Space":    32,
    " ":        32,  # 补充
    "PgUp":     33,
    "PgDn":     34,
    "End":      35,
    "Home":     36,
    "Left":     37,
    "Up":       38,
    "Right":    39,
    "Down":     40,
    "Print Screen": 44,
    "Ins":      45,
    "Del":      46,
    "0": 48,
    "1": 49,
    "2": 50,
    "3": 51,
    "4": 52,
    "5": 53,
    "6": 54,
    "7": 55,
    "8": 56,
    "9": 57,
    "A": 65,
    "B": 66,
    "C": 67,
    "D": 68,
    "E": 69,
    "F": 70,
    "G": 71,
    "H": 72,
    "I": 73,
    "J": 74,
    "K": 75,
    "L": 76,
    "M": 77,
    "N": 78,
    "O": 79,
    "P": 80,
    "Q": 81,
    "R": 82,
    "S": 83,
    "T": 84,
    "U": 85,
    "V": 86,
    "W": 87,
    "X": 88,
    "Y": 89,
    "Z": 90,
    "Num 0": 96,
    "Num 1": 97,
    "Num 2": 98,
    "Num 3": 99,
    "Num 4": 100,
    "Num 5": 101,
    "Num 6": 102,
    "Num 7": 103,
    "Num 8": 104,
    "Num 9": 105,
    "Num *": 106,
    "Num +": 107,
    "Num -": 109,
    "Num Del": 110,
    "/": 111,
    "F1": 112,
    "F2": 113,
    "F3": 114,
    "F4": 115,
    "F5": 116,
    "F6": 117,
    "F7": 118,
    "F8": 119,
    "F9": 120,
    "F10": 121,
    "F11": 122,
    "F12": 123,
    # "F13": 124,
    # "F14": 125,
    # "F15": 126,
    # "F16": 127,
    # "F17": 128,
    # "F18": 129,
    # "F19": 130,
    # "F20": 131,
    # "F21": 132,
    # "F22": 133,
    # "F23": 134,
    # "F24": 135,
    "Num Lock": 144,
    "Scroll Lock": 145,
    "Right Shift": 161,
    ";": 186,
    "=": 187,
    ",": 188,
    "-": 189,
    ".": 190,
    "`": 192,
    "[": 219,
    "\\": 220,
    "]": 221,
    "'": 222
}